#ifndef COLOR_H_
#define COLOR_H_

// By: Jesse Guarascia de Urena
// Color class
// Deals with Red, Green, Blue, and Alpha components of a colour
// Can be converted to a SDL_Color

#include <SDL.h>

class Color{
private:
	float r, g, b, a; // Color components

public:
	Color() : r (0.0f), g (0.0f), b (0.0f), a (0.0f) {}
	Color(float red, float green, float blue, float alpha){
		r = red;
		g = green;
		b = blue;
		a = alpha;
	}

	// Get/Set the components of the color
	inline float Red() { return r; }
	inline void SetRed(float red) { r = red; }

	inline float Green() { return g; }
	inline void SetGreen(float green) { g = green; }

	inline float Blue() { return b; }
	inline void SetBlue(float blue) { b = blue; }

	inline float Alpha() { return a; }
	inline void SetAlpha(float alpha) { a = alpha; }

	// Convert the color to an SDL_Color
	SDL_Color ToSDL_Color() {
		SDL_Color color = {(int)(r * 255), (int)(g * 255), (int)(b * 255)};

		return color;
	}
};

#endif // COLOR_H